<template>
  <div class="popover-content">
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('主页','/index')"
    >
      <i class="el-icon-user icon"></i>主页
    </div>
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('我的信息','/user/profile')"
    >
      <i class="el-icon-odometer icon"></i>我的信息
    </div>
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('笔记列表','/note')"
    >
      <i class="el-icon-odometer icon"></i>笔记列表
    </div>
<!--    <div-->
<!--      class="popover-content__item el-button"-->
<!--      @click.stop.prevent="menuClick('随机漫步','/note/CardMove')"-->
<!--    >-->
<!--      <i class="el-icon-odometer icon"></i>随机漫步-->
<!--    </div>-->
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('随机检测','/note/RandomTesting')"
    >
      <i class="el-icon-odometer icon"></i>随机检测
    </div>
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('合集','/note/compilation/Compilation')"
    >
      <i class="el-icon-odometer icon"></i>合集
    </div>
    <div
      class="popover-content__item el-button"
      @click.stop.prevent="menuClick('资源管理')"
    >
      <i class="iconfont iconnut icon"></i>资源管理
    </div>
  </div>
</template>
<script>
export default {
  name: 'menu-part',
  props: {
    closeLogin: {
      type: Function
    }
  },
  data() {
    return {}
  },
  methods: {
    menuClick(title, eventName) {
      this.$tab.openPage(title, eventName)
      console.log(' menuClick(eventName)', eventName)
      this.$emit('closeLogin')
      //关闭菜单的方法
      this.$emit('closeMenuAndFloating')
    }
  }
}
</script>
<style lang="scss" scoped>
.popover-content {
  width: 182px;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0px 16px 34px 0px rgba(0, 49, 128, 0.2);

  .el-button + .el-button {
    margin-left: 0;
  }

  .el-button:focus,
  .el-button:hover {
    color: var(--themeColor);
  }

  &__item {
    width: 100% !important;
    height: 50px;
    padding: 0;
    border: 0;
    line-height: 50px;
    font-size: 18px;
    border-radius: 0;
    color: var(--themeColor);
    padding: 0 20px;
    text-align: left;

    //&.el-button:hover {
    //  background: var(--shadowColor);
    //}

    > .icon {
      margin-right: 10px;
      font-size: 18px;
    }
  }
}
</style>
